# -*- coding: utf-8 -*-

"""
Nome do modulo: aula7.py
Autor: Soraia Janeiro
Data: 07/11/2013
Obs: exemplotk.py
"""

"""
#http:77effbot.org/tkinterbook/tkinter-hello-again-htm
from Tkinter import *
class App:
	def __init__(self, master):
		frame = Frame(master); frame.pack()
		self.button = Button(
			frame, text="SALIR", fg="red", command=
				frame.quit
			)
		self.button.pack(side=LEFT)
		self.hi_there = Button(frame, text="HOLA",
			command=self.say_hi)
		self.hi_there.pack(side=LEFT)
	
	def say_hi(self):
		print "Hey, Caramba...!"

root = Tk(); app = App(root);
root.mainloop(); root.destroy()
"""

"""
Obs: wxpython
"""

"""
import wx
def treta(event): print "treta"
class Example(wx.Frame):
	def __init__(self, *args, **kwargs):
		super(Example, self).__init__(*args, **kwargs)
		self.InitUI()
	def InitUI(self):
		menubar = wx.MenuBar(); fileMenu = wx.Menu()
		ftr = fileMenu.Append(103, 'TRETA', 'TRETA')
		fit = fileMenu.Append(wx.ID_EXIT, 'Qut', 'Qut')
		menubar.Append(fileMenu, '&File');
		self.SetMenuBar(menubar)
		self.Bind(wx.EVT_MENU, self.OnQuit, fit)
		self.Bind(wx.EVT_MENU, treta, ftr)
		self.SetSize((300, 200)); self.SetTitle('Menu')
		self.Centre(); self.Show(True)
	
	def OnQuit(self, e): self.Close()
def main(): ex = wx.App(); Example(None); ex.MainLoop()
if __name__ == '__main__': main() 
"""


"""
Obs: exemplopl1.py
"""

"""
import numpy as np
import matplotlib.pyplot as plt

mu, sigma = 100, 15
x = mu + sigma * np.random.randn(10000)

#The histogram of the data
n, bins, patches = plt.hist(x, 50, normed=1, facecolor='g', alpha=0.75)

plt.xlabel('Smarts')
plt.ylabel('Probability')
plt.title('Histogram of IQ')
plt.text(60, .025, r'$\mu=100,\ \sigma=15$')
plt.axis([40, 160, 0, 0.03])
plt.grid(True)
plt.show()
"""

"""
Obs: matplotlib
"""
#by Armin Moser
from mpl_toolkits.mplot3d import Axes3D
import matplotlib
import numpy as np
from matplotlib import cm
from matplotlib import pyplot as plt
step = 0.04; maxval = 1.0; fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

#create supporting points in polar coordinates
r = np.linspace(0,1.25,50); p=np.linspace(0,2*np.pi, 50)
R, P = np.meshgrid(r, p)
X, Y = R*np.cos(P),R*np.sin(P);Z = ((R**2 - 1)**2)
ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.YlGnBu_r)
ax.set_zlim3d(0,1);
ax.set_xlabel(r'$\phi_\mathrm{real}$')
ax.set_ylabel(r'$\phi_\mathrm{im}$')
ax.set_zlabel(r'$V(\phi)$')
plt.show()
